﻿@model SecurityAdmin.Web.Models.RegisterModel

@{
    Layout = "~/Views/Shared/_LayoutManageUser.cshtml";
}

<h2>NEW MEMBERSHIP</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Register </legend>

         @(Html.HiddenFor(p => p.UserId)) 

        <table >
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Email)
                    </div>
                </td>

                <td>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Email, new { @Value = @Model.UserName})
                    </div>
                </td>

                <td>
                    <div class="error-label">
                        @Html.ValidationMessageFor(model => model.Email)
                    </div>
                </td>

            </tr>

            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.UserName)
                    </div>
                </td>

                <td>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.UserName, new { @Value = @Model.UserName})
                    </div>
                </td>

                <td>
                    <div class="error-label">
                        @Html.ValidationMessageFor(model => model.UserName)
                    </div>
                </td>

            </tr>


            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Password)
                    </div>
                </td>

                <td>
                    <div class="editor-field">
                        @Html.PasswordFor(m => m.Password)

                    </div>
                </td>

                <td>
                    <div class="error-label">
                        @Html.ValidationMessageFor(model => model.Password)
                    </div>
                </td>

            </tr>

            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.ConfirmPassword)
                    </div>
                </td>

                <td>
                    <div class="editor-field">
                        @Html.PasswordFor(m => m.ConfirmPassword)

                    </div>
                </td>

                <td>
                    <div class="error-label">
                        @Html.ValidationMessageFor(model => model.ConfirmPassword)
                    </div>
                </td>

            </tr>

        </table>
        
        <p>
            <button name="button">Create</button>
        </p>
    </fieldset>
}



<style scoped="scoped">
.editor-label {
color:  black ;
font-weight: bold;
display: block;
width: 150px;
float: left;
vertical-align:central;
}

.error-label {
color:  red ;
font-weight: bold;
display: block;
width: 20px;
float: left;
vertical-align:central;
}
label:after { content: ": " }

</style>
